const state = {
  // selected: 'home'
  selected: 'me'
}

const mutations = {
  SET_CURRENT: (state, current) => {
    state.selected = current
  }
}

const actions = {
  select({ commit, state, dispatch }, selected) {
    // console.log('xxx,', selected)
    return new Promise(resolve => {
      commit('SET_CURRENT', selected)
      resolve()
    })
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
